<?php
include('codebase-php\bot_api.php');
include('codebase-php\Utils.php');
include('codebase-php\LocalDataClass.php');
include('codebase-php\BotClass.php');
include('codebase-php\GetSettingsFromXml.php');
set_include_path(get_include_path() . PATH_SEPARATOR . "codebase-php");
include('Zend\config.php');
include('Zend\Config\Xml.php');
AutoStart($argv);
include('InvDel_class.php');
$np = new InvDelPlugin();
if (isset($getP['action'])) {
    if ($getP['action'] == 'refresh') {
        $np->ld->userId=$CurrentUserId;
        $np->ld->EasyConnect();
            $np->GetForm($getP);
    }
    if ($getP['action'] == 'invOver') {
        $np->ld->userId=$CurrentUserId;
        $np->ld->EasyConnect();
            $np->GetForm($getP);
    }
    if ($getP['action'] == 'menu') {
        $np->ld->userId=$CurrentUserId;
        $np->ld->EasyConnect();
            $np->GetForm($getP);
    }
//****************edit sowijo for removing items******************    
    if ($getP['action'] == 'RemoveGift') {
        $np->ld->userId=$CurrentUserId;
        $np->ld->EasyConnect();
        $np->ld->UpdatePlSettings('InvDelRemoveGift', $postdata);
    }
    if ($getP['action'] == 'activated') {
        $np->ld->userId=$CurrentUserId;
        $np->ld->EasyConnect();
        $np->ld->SavePlSettings('InvDelActivated', $postdata);
    }
    
}
?>